Method of Using Dithiazines and Derivatives Thereof in the Treatment of Wells

ABSTRACT

Corrosion of metallic tubulars in an oil, gas or geothermal well may be inhibited by introducing into the well a dithiazine derivative of the formula: 
     
       
         
         
             
             
         
       
     
     wherein R 14  is a C 1 -C 24  straight chain or branched alkyl group; or a C 6 -C 24  aryl or arylalkyl group; R 15  is a C 1 -C 6  alkyl or a C 6 -C 30  aryl or alkylaryl group; and X is chlorine, bromine or iodine. The dithiazine may be isolated from a whole spent fluid (WSF) formed by reaction of hydrogen sulfide and a triazine. Alternately, the whole spent fluid containing dithiazine or dithiazine derivative and a corrosion inhibiting formulation may be used to inhibit corrosion in the well.

This application is a divisional application of U.S. patent applicationSer. No. 13/236,332 which is a continuation-in-part application of U.S.patent application Ser. No. 12/862,582, filed on Aug. 24, 2010, now U.S.Pat. No. 8,022,018, which is a continuation-in-part application of U.S.patent application Ser. No. 12/643,521, filed on Dec. 21, 2009, now U.S.Pat. No. 8,022,017; both of U.S. Pat. Nos. 8,022,018 and 8,022,017 beingherein incorporated by reference.

FIELD OF THE INVENTION

The invention relates to methods of inhibiting corrosion in metallicsurfaces during treatment of a well by introducing into the well adithiazine or a dithiazine derivative.

BACKGROUND OF THE INVENTION

During the production life of an oil or gas well, the production zonewithin the well is typically subjected to numerous treatments. Corrosionof metallic surfaces, such as downhole tubulars, during such treatmentsis not uncommon and is evidenced by surface pitting, localized corrosionand loss of metal. Metallic surfaces subject to such corrosion arecarbon steels, ferritic alloy steels, and high alloy steels includingchrome steels, duplex steels, stainless steels, martensitic alloysteels, austenitic stainless steels, precipitation-hardened stainlesssteels and high nickel content steels.

Further, aqueous fluids, such as those used in drilling and completion,have a high salt content which causes corrosion. Gases, such as carbondioxide and hydrogen sulfide, also generate highly acidic environmentsto which metallic surfaces become exposed. For instance, corrosioneffects from brine and hydrogen sulfide are seen in flow lines duringthe processing of gas streams. The presence of methanol, often added tosuch streams to prevent the formation of undesirable hydrates, furtheroften increases the corrosion tendencies of metallic surfaces.

Further, naturally occurring and synthetic gases are often conditionedby treatment with absorbing acidic gases, carbon dioxide, hydrogensulfide and hydrogen cyanide. Degradation of the absorbent and acidiccomponents as well as the generation of by-products (from reaction ofthe acidic components with the absorbent) results in corrosion ofmetallic surfaces.

The use of corrosion inhibitors during well treatments to inhibit therate of corrosion on metal components and to protect wellbore tubulargoods is well known. Commercial corrosion inhibitors are usuallyreaction mixtures or blends that contain at least one component selectedfrom nitrogenous compounds, such as amines, acetylenic alcohols, mutualsolvents and/or alcohols, surfactants, heavy oil derivatives andinorganic and/or organic metal salts.

Many conventional corrosion inhibitors used to reduce the rate of acidattack on metallic surfaces and to protect the tubular goods of thewellbore are becoming unacceptable in oilfield treatment processes. Forinstance, many conventional corrosion inhibitors have becomeunacceptable due to environmental protections measures that have beenundertaken. In some instances, such as in stimulation processesrequiring strong acids, high temperatures, long duration jobs and/orspecial alloys, the cost of corrosion inhibitors may be so high that itbecomes a significant portion of total costs.

Efforts have been undertaken to find alternative corrosion inhibitorswhich are cost effective and which are capable of controlling, reducingor inhibiting corrosion.

SUMMARY OF THE INVENTION

Corrosion of metallic tubulars in a well may be inhibited from formingby introducing into the well a dithiazine or dithiazine derivative ofthe structural formulae (I)-(V):

wherein R is selected from the group consisting of a C₁ to C₁₂ saturatedor unsaturated hydrocarbyl group or a C₁ to C₁₀ ω-hydroxy saturated orunsaturated hydrocarbyl group; R¹ is selected from the group consistingof a C₁-C₂₄ straight or branched chain alkyl group or a C₁-C₂₄ arylalkylgroup; R² is a straight or branched alkylene group; R¹⁴ is a C₁-C₂₄straight chain or branched alkyl group; or a C₆-C₂₄ aryl or arylalkylgroup; R¹⁵ is a C₁-C₆ alkyl or a C₆-C₃₀ aryl or alkylaryl group; and Xis chlorine, bromine or iodine.

The compounds of formula (II), (III) and (V) are quaternized derivativesof the dithiazine of formula (I) and (IV).

The dithiazine of structure (I) may be isolated from a whole spent fluid(WSF) formed by reaction of hydrogen sulfide and a triazine, such as atriazine of formula (VI):

wherein R is defined above in a hydrogen sulfide scavenger gas scrubbingoperation. Alternatively, the whole spent fluid containing thedithiazine of structure (I) may be introduced into the well withoutisolation of the dithiazine.

Synergistic effects on inhibition of corrosion have further been notedwhen the dithiazine or dithiazine derivatives of formulae (I)-(V) areformulated with at least one corrosion inhibitor component selected fromalkyl, alkylaryl or arylamine quaternary salts; mono or polycyclicaromatic amine salts; imidazoline derivatives; a mono-, di- or trialkylor alkylaryl or arylalkyl phosphate ester; a monomeric or oligomericfatty acid or salt; an alkyl or alkenyl substituted pyridinium; apolyamine amide; a polyhydroxy or alkoxylated amine or amide; a pyrazinederivative or a mercaptocarboxylic acid. Synergistic effects havefurther been noted when WSF is combined with a corrosion inhibitingformulation containing any one or more of these corrosion inhibitorcomponents.

BRIEF DESCRIPTION OF THE DRAWINGS

In order to more fully understand the drawings referred to in thedetailed description of the present invention, a brief description ofthe drawings is presented, in which:

FIGS. 1-7 demonstrate the effectiveness as whole spent fluids (WSF),formulated with additives defined herein.

FIGS. 8-12 demonstrate the effectiveness of quaternized reactionproducts of dithiazine compared to non-quaternized dithiazines.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Corrosion is inhibited during the treatment of a subterranean formationwhich is penetrated by an oil, gas or geothermal well by introducinginto the well a dithiazine of the formula (I):

wherein R is selected from the group consisting of a C₁ to C₁₂ saturatedor unsaturated hydrocarbyl group or a C₁ to C₁₀ ω-hydroxy saturated orunsaturated hydrocarbyl group; In a preferred embodiment, R is either(i) —R³—OH, wherein R³ is an alkylene group, preferably R is a C₁-C₆—OHgroup, most preferably —CH₂CH₂—OH; or (ii) a C₁-C₆ alkyl group, morepreferably methyl or ethyl, and most preferably methyl.

The dithiazine of formula (I) is preferably that obtained from thehomogeneous fluid which is produced during a hydrogen sulfide scavengergas scrubbing operation. In such scrubbing operations, a scavenger isintroduced to a stream of liquid hydrocarbons or natural gas (sour gas)which contains hydrogen sulfide. In addition, such gas scrubbingoperations remove hydrogen sulfide from oil production streams as wellas petroleum contained in storage tanks, vessels, pipelines, etc. Thescavenger is most commonly a water soluble triazine such as those offormula (VI):

wherein R is defined above. Typically, the triazine is1,3,5-tris(hydroxyethyl)-hexahydro-s-triazine. The production ofdithiazines during a scrubbing operation using a triazine as scavengeris reported in U.S. Pat. No. 6,582,624 wherein the spent fluid isreported to contain amorphous dithiazine solids. Typically, dithiazinesremain part of the whole spent fluid resulting from the scrubbingoperation. Whole spent fluid is typically discarded.

In the method described herein, the dithiazine of formula (I) resultingfrom the scrubbing operation may be introduced into a gas, oil orgeothermal well where it functions as a corrosion inhibitor.

The whole spent fluid containing the dithiazine may be introduced to thewell or dithiazine. Alternatively, the dithiazine of formula (I) may beisolated from the whole spent fluid by processes known in the art.

In addition to the dithiazines of formula (I), excellent corrosioninhibition properties may be obtained by the use of dithiazinederivatives of either formula (II), formula (III), (IV) or (V):

wherein R and X are as described above; R¹ is selected from the groupconsisting of a C₁-C₂₄ straight chain or branched alkyl group or aC₁-C₂₄ arylalkyl group; preferably a C₁-C₂₂ alkyl group, more preferablya C₁-C₁₂ alkyl group, most preferably a C₁-C₆ alkyl group; R² is a C₁-C₆straight or branched chain alkylene group; R¹⁴ is a C₁-C₂₄ straightchain or branched alkyl group; or a C₆-C₂₄ aryl or arylalkyl group; R¹⁵is a C₁-C₆ alkyl or a C₆-C₃₀ aryl or alkylaryl group; and X is chlorine,bromine or iodine. R¹ may also be substituted with an aryl groupincluding benzyl and naphthyl. Alternatively, R¹ may be a C₁-C₂₄arylalkyl group, such as benzyl, wherein the alkyl portion of thearylalkyl group may be linear or branched and the aryl portion of thearylalkyl group may be substituted with a C₁-C₆ alkyl group, such asmethyl. In a preferred embodiment, R² is —CH₂—CH₂—CH₂—CH₂— or—CH₂—CH₂—CH₂—CH₂—CH₂—. In a preferred embodiment, R of the compound offormula (III) is either —CH₂CH₂OH or —CH₃, R¹⁴ of the compound offormula (IV) is either methyl or phenyl; and R¹⁴ and R¹⁵ of the compoundof formula (V) is —CH₃ and benzyl, respectively.

The quaternized product of formula (II) may be prepared by reacting adithiazine of formula (I) with a halide of the formula R¹X inapproximately equimolar ratios. A representative quaternization reactionfor the preparation of the compounds of formula (II) may be illustratedas follows:

In a preferred embodiment, the R¹X used in the quaternization reactionis benzyl chloride or chloromethyl naphthalene and R is either —CH₂CH₂OHor —CH₃. Most preferred are those reactants set forth in Table I belowwhich is followed by the designated reaction schemes (B), (C), (D) and(E):

TABLE I Reaction Scheme R R¹X (B) —CH₂CH₂OH Benzyl chloride (C —CH₃Benzyl chloride (D) —CH₂CH₂OH Chloromethyl naphthalene (E) —CH₃Chloromethyl naphthalene

The quaternized product of formula (III) may be prepared by reacting adithiazine of formula (I) with a dihalide of the formula X—R²—X whereineach R² is a C₁-C₆ straight or branched alkylene group, preferably—CH₂—CH₂—CH₂—CH₂— or —CH₂—CH₂—CH₂—CH₂—CH₂—; and wherein X is chlorine,bromine or iodine.

A representative quaternization reaction for the preparation of thecompounds of formula (III) may be illustrated by reaction scheme (F):

where R is —R³—OH, the dithiazine of formula (I) may be derivatized toform compounds of structural formula (IV) and (V). For instance, thecompound of formula (IV) may be prepared by reacting the dithiazine offormula (I) with a stoichiometric amount of acid chloride, such as analkyl, aryl or arylalkyl acid chloride or acid anhydride. In a preferredembodiment, the dithiazine is reacted with an acid chloride of theformula R¹⁴COCl. Typically, an alkyl amine, such as triethylamine, isused at the end of the reaction, especially when an acid chloride isused, in order to remove any halide salt. A representative reactionscheme for the production of the compound of formula (IV) wherein R¹⁴ isphenyl may be represented by the following:

The dithiazine derivative of formula (V) may be prepared by reacting thedithiazine of formula (I) with a stoichiometric amount of an alkyl, arylor arylalkyl acid anhydride to form an ester of the dithiazine and thenreacting the ester of the dithiazine with an alkyl, aryl or alkylarylhalide. A representative reaction scheme for the production of compoundsof formula (V) where R¹⁴ is —CH₃ and R¹⁵ is benzyl may be illustratedas:

The amount of dithiazine or dithiazine derivative introduced into thewell is an amount sufficient to inhibit corrosion of the base materials,especially iron, of tubulars in the well. Typically, the amount ofdithiazine or dithiazine derivative introduced into the well is in therange of from about 0.05% to about 5% by volume of the treatment fluidintroduced.

In a preferred embodiment, the dithiazine of formula (I) or thedithiazines of formulae (II), (III), (IV) and (V) (all of which may beisolated or within whole spent fluid) may be formulated with at leastone other component selected from the groups:

(i) an alkyl, hydroxyalkyl, alkylaryl arylalkyl or arylamine quaternarysalt;

(ii) a mono or polycyclic aromatic amine salt;

(iii) an imidazoline derivative;

(iv) a mono-, di- or trialkyl or alkylaryl or arylalkyl phosphate ester;

(v) a monomeric or oligomeric fatty acid or salt thereof;

(vi) an alkyl or alkenyl substituted pyridinium;

(vii) a polyamine amide;

(viii) a polyhydroxy or alkoxylated amine or amide;

(ix) a pyrazine derivative; and

(x) mercaptocarboxylic acids.

In a more preferred embodiment, the dithiazine or dithiazine derivativesare formulated with the formulation component (a) through (x) such thatthe volume ratio of dithiazine to the additive component is typicallybetween from about 1:0.5 to about 1:2.0, more typically between fromabout 1:0.8 to about 1:1. Formulating the dithiazine (or quaternizeddithiazine) with the additive component may be effectuated by adding theadditive to the whole spent fluid or by adding the additive to analcohol containing solvent (for example methanol) containing thedithiazine or quaternized dithiazine.

Exemplary of the alkyl, hydroxyalkyl, alkylaryl arylalkyl or arylaminequaternary salts are those alkylaryl, arylalkyl and arylamine quaternarysalts of the formula [N⁺R⁵R⁶R⁷R⁸][X⁻] wherein R⁵, R⁶, R⁷ and R⁸ containone to 18 carbon atoms, X is Cl, Br or I. In a preferred embodiment, anyor all of the R⁵, R⁶, R⁷ and R⁸ are a C₁-C₆ alkyl group or ahydroxyalkyl group wherein the alkyl group is preferably a C₁-C₆ alkylor an alkyl aryl such as benzyl. The mono or polycyclic aromatic aminesalt with an alkyl or alkylaryl halide include salts of the formula[N⁺R⁵R⁶R⁷R⁸][X⁻] wherein R⁵, R⁶, R⁷ and R⁸ contain one to 18 carbonatoms, X is Cl, Br or I.

Typical quaternary ammonium salts are tetramethyl ammonium chloride,tetraethyl ammonium chloride, tetrapropyl ammonium chloride, tetrabutylammonium chloride, tetrahexyl ammonium chloride, tetraoctyl ammoniumchloride, benzyltrimethyl ammonium chloride, benzyltriethyl ammoniumchloride, phenyltrimethyl ammonium chloride, phenyltriethyl ammoniumchloride, cetyl benzyldimethyl ammonium chloride, and hexadecyltrimethyl ammonium chloride. Preferred are alkylamine benzyl quaternaryammonium salts, benzyl triethanolamine quaternary ammonium salts andbenzyl dimethylaminoethanolamine quaternary ammonium salts.

In addition, the salt may be a quaternary ammonium or alkyl pyridiniumquaternary salt such as those represented by the general formula:

wherein R⁹ is an alkyl group, an aryl group or an alkyl group havingfrom 1 to about 18 carbon atoms and B is chloride, bromide or iodide.Among these compounds are alkyl pyridinium salts and alkyl pyridiniumbenzyl quats. Exemplary compounds include methyl pyridinium chloride,ethyl pyridinium chloride; propyl pyridinium chloride, butyl pyridiniumchloride (such as N-butyl-4-methylpyridinium chloride), octyl pyridiniumchloride, decyl pyridinium chloride, lauryl pyridinium chloride, cetylpyridinium chloride, benzyl pyridinium, dodecylpyridinium chloride,tetradecylpyridinium chloride, N-methylpyridinium chloride,N-methylpyridinium bromide, N-ethylpyridinium chloride,N-ethylpyridinium bromide, 2-vinylpyridinium chloride, 2-vinylpyridiniumbromide, 3-vinylpyridinium chloride, 3-vinylpyridinium bromide,4-vinylpyridinium chloride and 4-vinylpyridinium bromide, and an alkylbenzyl pyridinium chloride, preferably wherein the alkyl is a C₁-C₆hydrocarbyl group, as well as mixtures thereof.

The additive may further be an imidazoline derived from a diamine, suchas ethylene diamine (EDA), diethylene triamine (DETA), triethylenetetraamine (TETA) etc. and a long chain fatty acid such as tall oilfatty acid (TOFA). Suitable imidazolines include those of formula (IV):

wherein R¹² and R¹³ are independently a C₁-C₆ alkyl group morepreferably hydrido, R¹¹ is hydrido and R¹⁰ a C₁-C₂₀ alkyl, a C₁-C₂₀alkoxyalkyl group. In a preferred embodiment, R¹¹, R¹² and R¹³ are eachhydrido and R¹⁰ is the alkyl mixture typical in tall oil fatty acid(TOFA).

Suitable mono-, di- and trialkyl as well as alkylaryl phosphate estersand phosphate esters of mono, di, and triethanolamine typically containbetween from 1 to about 18 carbon atoms. Preferred mono-, di- andtrialkyl phosphate esters, alkylaryl or arylalkyl phosphate esters arethose prepared by reacting a C₃₋₁₈ aliphatic alcohol with phosphorouspentoxide. The phosphate intermediate interchanges its ester groups withtriethyl phosphate with triethylphosphate producing a more broaddistribution of alkyl phosphate esters. Alternatively, the phosphateester may be made by admixing with an alkyl diester, a mixture of lowmolecular weight alkyl alcohols or diols. The low molecular weight alkylalcohols or diols preferably include C₆ to C₁₀ alcohols or diols.Further, phosphate esters of polyols and their salts containing one ormore 2-hydroxyethyl groups, and hydroxylamine phosphate esters obtainedby reacting polyphosphoric acid or phosphorus pentoxide withhydroxylamines such as diethanolamine or triethanolamine are preferred.

The additive may further be a monomeric or oligomeric fatty acid.Preferred are C₁₄-C₂₂ saturated and unsaturated fatty acids as well asdimer, trimer and oligomer products obtained by polymerizing one or moreof such fatty acids.

The additive may also be a polyamine amide such as products from thereaction of polyethyleneamines and carboxylic acids, such aspolymethylenepolyaminedipropionamides as well as acylated derivatives ofamino acids appended to a polyols, polyamine or hydroxylamine backbone.

Suitable polyhydroxy or alkoxylated amines or amides such astallow-CONH(CH₂)₃NHCH₂CH₂OH and tallow-NH(CH₂)₃NH₂ ethoxylated with 3moles of ethylene oxide as well as deoxyglucityl derivatives ofalkylamines.

Suitable pyrazine derivatives include methyl substituted derivativessuch as 3,5-dimethylpyrazine, 2,3,5,6-tetramethylpyrazine and2,4,6-trimethylpyridine reached with an aldehyde such as 1-dodecanal orketone, such as 5,7-dimethyl-3,5,9-decatriene-2-one.

Further the additive may be a mercaptocarboxylic acid such asthioglycolic acid, 3,5′-dithiopropionic acid or potassium dimethyldithiocarbamate.

A water soluble fluid containing the dithiazine, dithiazine derivative,or whole spent fluid and, optionally, one or more formulationcomponents, is typically introduced into the wellbore or subterraneanformation. The fluid of the water soluble fluid may be a hydrophilicsolvent such as water (including fresh water, brackish water and brine,such as sodium chloride, potassium chloride and ammonium chloridebrine). The hydrophilic solvent may further be a hydrophilic organicsolvent, such as methanol or ethylene glycol.

In a preferred embodiment, the dithiazine is not separated and the wholespent fluid (containing the dithiazine or dithiazine derivative) is thencombined with a corrosion inhibiting formulation containing at least onecorrosion inhibitor of component (a) through (x). The weight ratio ofspent fluid to the corrosion inhibiting formulation may be from 99:1 to1:99 weight percent and typically is between from about 25:75 to about75:25, preferably approximately 50:50.

In this embodiment, the whole spent fluid typically acts as a diluent tothe corrosion inhibiting formulation. In a preferred embodiment, thecorrosion inhibiting formulation is a commercial formulation containingone or more corrosion inhibitors. The corrosion inhibiting formulationmay further contain water, an organic hydrophilic solvent, such asmethanol. Suitable organic hydrophilic solvents include methanol andethylene glycol, etc. Use of the whole spent fluid permits dilution ofthe corrosion inhibiting formulation by as much as 40 to 60 volumepercent.

The whole spent fluid and corrosion inhibiting formulation exhibit asynergistic effect in the resulting blended fluid. For instance, a threeto four fold decrease in corrosion inhibition has been noted from theblended fluid compared to the amount of corrosion inhibition seen in thewhole spent fluid and corrosion inhibiting formulation individually. Thesynergism has been especially noted where the volume ratio of dithiazine(in the whole spent fluid) to corrosion inhibitor(s) (in the corrosioninhibiting formulation) is between from about 1:0.5 to about 1:2.0.

The use of a blend of whole spent fluid with corrosion inhibitingformulation has great commercial implications since it is not necessaryto isolate the dithiazine from the whole spent fluid. As such, the wholespent fluid is combined with the corrosion inhibiting formulation. Sincewhole spent fluid is typically regarded as a waste material, the blenddefined herein lessens the environmental impact created by thegeneration of whole spent fluid in the oil and gas service industry. Inso doing, an otherwise useless waste product is converted to a productdemonstrating superior corrosion inhibiting properties.

Since the dithiazine, dithiazine derivatives and synergistic blendsdramatically reduce corrosion on metal, they may be used in a variety ofindustrial applications. Alternatively, the dithiazine or dithiazinederivatives may be introduced prior to or subsequent to, as well asduring, a well treatment operation. For instance, the dithiazine ordithiazine derivatives as well as formulations containing the dithiazineor dithiazine derivative may be introduced into the well duringstimulation.

Other embodiments within the scope of the claims herein will be apparentto one skilled in the art from consideration of the description setforth herein. It is intended that the specification, together with theexamples, be considered exemplary only, with the scope and spirit of theinvention being indicated by the claims which follow.

The following examples are illustrative of some of the embodiments ofthe present invention.

All percentages set forth in the Examples are given in terms of weightunits except as may otherwise be indicated.

EXAMPLES Example 1

The following are used to describe components of this Example.

The dithiazine refers to 5-hydroxyethyl-hexahydro-1,3,5-dithiazine ofthe formula I wherein R is —CH₂CH₂—OH.

Unspent fluid (“UF”) refers to thehexahydro-1,3,5-tri(hydroxyethyl)-s-triazine of the formula II abovewherein each R is —CH₂CH₂—OH prior to any spending with hydrogensulfide.

Whole spent fluid (“WSF”) refers to the homogeneous fluid produced in ahydrogen sulfide scavenger gas scrubbing operation wherein the tower wascharged with a triazine[1,3,5-tris(hydroxyethyl)-hexahydro-s-triazine]containing fluid in water and methanol. The fluid contains a high levelof the dithiazine, it still being in the WSF.

Isolated dithiazine (“iDTZ”) refers to dithiazine from the WSF that hasbeen separated out of solution in its pure form.

Formulated products were paired using one of the following additives:

-   -   Methyl/Ethylpyridinium benzyl quat (APBQ);    -   Benzyldimethylcocoamine benzyl quat (ABQ);    -   TOFA DETA Imidazoline derivative (“TDID”);    -   Benzyl triethanolaminium quat (BTEAQ); and    -   Benzyl dimethylaminoethanolaminium quat (BDMAEQ).

-   Formulated WSF refers to the product formed by dissolving the    additive in the WSF at a concentration of 12.2 weight percent with    methanol at 10 weight percent.

-   Formulated iDTZ refers to the product prepared by dissolving iDTZ in    methanol at a concentration of 9.6 weight percent and then adding to    the resultant the additive at a concentration of 19.2 weight    percent. This product was then mixed for a brief period while    heating to approximately 60° C.

Corrosion rate studies were performed using at ambient temperature aGamry G Series potentiostat and the conventional Linear PolarizationResistance (LPR) module within the DC105™ corrosion technique softwarepackage (Rp/Ec trend). The instantaneous corrosion rate of the threeelectrode probe system was determined using voltage settings −0.2V to+0.02V versus open-circuit potential, E_(oc). These studies were carriedout during an approximately 20-24 hr run time. The treat rates of thecorrosion inhibitors were between 50 and 200 ppm. A standard carbondioxide saturated brine system comprised of 3 weight percent sodiumchloride and 0.3 weight percent calcium chloride in 2 liter corrosioncells sparged with carbon dioxide was employed. LPR scans are shown inFIGS. 1-8 wherein:

-   -   FIG. 1 contrasts the differences at a treatment rate of 500 ppm        in corrosion rates between WSF and formulated WSF containing the        additive APBQ. As shown, much higher corrosion rates are        demonstrated with WSF than formulated WSF;    -   FIG. 2 contrasts the differences at a treatment rate of 500 ppm        in corrosion rates between formulated WSF and UF both containing        the additive APBQ. As shown, formulated WSF is a better        corrosion inhibitor than UF;    -   FIG. 3 contrasts the differences at a treatment rate of 430 ppm        of WSF and iDTZ. FIG. 3 shows that iDTZ is much more effective        than WSF as a corrosion inhibitor;    -   FIG. 4 contrasts the differences at a treatment rate of 430 ppm        of Formulated iDTZ (with the additive APBQ) and iDTZ alone. FIG.        4 shows that Formulated iDTZ is a better corrosion inhibitor        than iDTZ alone;    -   FIG. 5 contrasts the differences at a treatment rate of 430 ppm        in corrosion rates between iDTZ alone and Formulated iDTZ (with        the additive ABQ), Formulated iDTZ (with the additive TDID) and        Formulated iDTZ (with the additive APBQ). FIG. 5 shows the        Formulated iDTZ (with APBQ) to be the best corrosion inhibitor.        Formulated iDTZ (with TDID) and Formulated iDTZ (with ABQ)        demonstrate similar results. All of the formulated iDTZs        demonstrated better corrosion inhibition than iDTZ alone;    -   FIG. 6 contrasts the differences at a treatment rate of 125 ppm        in corrosion rates between Formulated iDTZ (with BTEAQ) and        Formulated iDTZ (with APBQ). FIG. 6 demonstrates better        corrosion results with Formulated iDTZ (with APBQ); and    -   FIG. 7 contrasts the differences at a treatment rate of 125 ppm        in corrosion rates between Formulated iDTZ (with APBQ) and        Formulated iDTZ (with BDMAEQ). FIG. 7 demonstrates better        corrosion results with Formulated iDTZ (with APBQ).

Example 2

A dithiazine quaternization reaction product was prepared in accordancewith the following synthetic pathway:

by dissolving in 50 mls of methanol about 2.84 grams (17.2 mmols) of thedithiazine together with a 10% molar excess of the R¹—X reagent (2.42grams, 19.1 mmols). The solution was heated to 125° C. and stirred for 6hrs in a Parr reactor. Upon cooling the solution was recovered as a darkred.

Corrosion rate studies were conducted using 35 parts of active speciesper million by mass at ambient temperature on a Gamry G Seriespotentiostat and the conventional Linear Polarization Resistance (LPR)module within the DC105™ corrosion technique software package (Rp/Ectrend) in accordance with the procedure set forth in Example 1. Theinstantaneous corrosion rate of the three electrode probe system wasdetermined using voltage settings −0.2V to +0.02V versus open-circuitpotential, E_(oc). These studies were carried out during anapproximately 20-24 hr run time. The treat rates of the corrosioninhibitors were between 50 and 200 ppm. A standard carbon dioxidesaturated brine system comprised of 3 weight percent sodium chloride and0.3 weight percent calcium chloride in 2 liter corrosion cells spargedwith carbon dioxide was employed. LPR scans are shown in FIGS. 8-10wherein:

-   -   FIG. 8 contrasts the differences of compound (I) wherein R is        methyl at 35 parts per million (ppm) (by mass) [or 0.26 ppm (by        moles)] and compound (II) wherein R is methyl and R¹ is benzyl        at 35 parts per million (ppm) (by mass) [or 0.13 ppm (by        moles)].    -   FIG. 9 contrasts the differences of compound (I) wherein R is        HO—CH₂—CH₂— 35 parts per million (ppm) (by mass) [or 0.21 ppm        (by moles)] and compound (II) wherein R is HO—CH₂—CH₂— and R¹ is        benzyl at 35 parts per million (ppm) (by mass) [or 0.12 ppm (by        moles)].    -   FIG. 10 contrasts the differences of compound (I) wherein R is        HO—CH₂—CH₂— at 35 ppm [or 0.21 ppm (by moles)] and compound (B)        wherein R is HO—CH₂—CH₂— and R¹ is naphthylmethyl at 35 parts        per million (ppm) (by mass) [or 0.10 ppm (by moles)].        As shown, much better corrosion rate inhibition is demonstrated        with the derivatized dithiazines represented by compound (II)        than compound (I) especially considering that lower molar        quantities of the derivatized dithiazines were used.

Example 3

A dithiazine quaternization reaction product was prepared in accordancewith the following synthetic pathway:

by dissolving in 50 mls of methanol about 3 grams (18.2 mmols) of thedithiazine together with the X—R²—X— reagent (9.1 mmols). The solutionwas heated to 125° C. and stirred for 6 hrs in a Parr reactor. Uponcooling the solution was recovered as a dark red.

Corrosion rate studies were conducted at ambient temperature on a GamryG Series potentiostat and the conventional Linear PolarizationResistance (LPR) module within the DC105™ corrosion technique softwarepackage (Rp/Ec trend) in accordance with the procedure set forth inExample 1. The instantaneous corrosion rate of the three electrode probesystem was determined using voltage settings −0.2V to +0.02V versusopen-circuit potential, E_(oc). These studies were carried out during anapproximately 20-24 hr run time. The treat rates of the corrosioninhibitors were between 50 and 200 ppm. A standard carbon dioxidesaturated brine system comprised of 3 weight percent sodium chloride and0.3 weight percent calcium chloride in 2 liter corrosion cells spargedwith carbon dioxide was employed. LPR scans are shown in FIGS. 11 and 12wherein:

-   -   FIG. 11 contrasts the differences of the structure of        formula (I) wherein R is HO—CH₂—CH₂— at 0.21 ppm (by moles) and        the structure of formula (III) wherein R is HO—CH₂—CH₂— and R²        is C₅H₁₀ at 0.12 ppm (by moles).    -   FIG. 12 contrasts the differences of the structure of        formula (I) wherein R is HO—CH₂—CH₂— at 0.21 ppm (by moles) and        the structure of formula (III) wherein R is HO—CH₂—CH₂— and R²        is C₄H₈ at 0.12 ppm (by moles).        As shown, much better corrosion rate inhibition is demonstrated        with the derivatized dithiazines represented by compound (III)        than the dithiazines represented by compound (I).

Example 4

5-(2-benzoyloxyethyl)hexahydro-1,3,5-dithiazine was prepared inaccordance with the following synthetic pathway:

by dissolving in 1 ml of methylene chloride about 400 mg of5-hydroxyethyl-hexahydro-1,3,5-dithiazine and a stoichiometric amount ofbenzoyl chloride in a sealed ReactiVial vessel at 100° C. and stirredfor 8 hrs. About 400 mg of triethylamine was added to the resultingproduct and triethylammonium chloride salt was removed.

Example 5

5-(2-acetoxyethyl)hexahydro-1,3,5-dithiazine was prepared in accordancewith the following synthetic pathway:

by dissolving in 1 ml of methylene chloride about 400 mg of5-hydroxyethyl-hexahydro-1,3,5-dithiazine and a stoichiometric amount ofacetic anhydride and heating the mixture at 100° C. for approximately 8hours. The solvent was then removed from the resulting mixture and theester of formula (XVI) was isolated. Above 200 mg of the ester was thendissolved in methanol and a stoichiometric amount of benzyl chloride wasadded to a sealed ReactiVial vessel. The solution was heated toapproximately 120° C. for about 6 hours.

Example 6

Corrosion inhibition tests were conducted on the product solutions ofExample 4 and Example 5 by ambient pressure linear polarizationresistance (LPR) which was performed at ambient temperature in 2000 mLglass resin kettles. Corrosion rates were monitored using a linearpolarization resistance instrument with 3 electrode probes. Tests were24-hour exposures of AISI 1018 (UNS G10180) steel electrodes to stirredsolutions at room temperature using a brine (3% NaCl, 0.3% CaCl₂×2H₂O)sparged with CO₂. In each test, 50 ppm of compounds of formula (I),(II), (III) and (IV) in Examples 4 and 5 in the brine were evaluated.Corrosion rates after 23 hours were determined by weight loss of thereference electrode. Electrodes were cylindrical with a surface area of9 cm². Measured corrosion rates are set forth in Table I.

TABLE I Corrosion, Mils per year Compound (mpy) (I) 1.60 (II) 0.60 (III)0.18 (IV) 0.26The compound of formula (II) exhibited more than 100% improved corrosionrate over the compound of formula (I). The corrosion rate of thecompound of formula (I) was just over one tenth of the corrosion rate ofthe compound of formula (I). The compound of formula (IV) had betterthan 100% improvement in corrosion rate over the compound of formula(I).

Example 7

Whole spent fluid (WSF) produced in a hydrogen sulfide scavenger gasscrubbing operation was combined with commercially available corrosioninhibitor formulations—Technihib 366 (“A”) and Technihib 356 (“B”), bothproducts of Baker Hughes Incorporated. Corrosion rates after 21 hourswere determined as set forth in Example 6 and are set forth in Table IIwherein 75 ppm of each of the formulations was tested:

TABLE II Corrosion, Mils per year Formulation Wt. Ratio (mpy) A 100 3.54WSF/A 50/50 1.87 B 100 4.55 WSF/B 50/50 2.43Table II illustrates that better results were obtained when a mixture ofthe whole spent fluid was used in combination with the commercialformulation than when the commercial formulation was used by itself.

From the foregoing, it will be observed that numerous variations andmodifications may be effected without departing from the true spirit andscope of the novel concepts of the invention.

What is claimed is:
 1. A dithiazine of the formula:

wherein: R¹⁴ is a C₁-C₂₄ straight chain or branched alkyl group; or aC₆-C₂₄ aryl or arylalkyl group; R¹⁵ is a C₁-C₆ alkyl or a C₆-C₃₀ aryl oralkylaryl group; and X is chlorine, bromine or iodine.
 2. The dithiazineof claim 1, wherein R¹⁴ is a C₁-C₁₂ straight chain or branched alkylgroup.
 3. The dithiazine of claim 1, wherein X is —Cl.
 4. The dithiazineof claim 1, wherein the dithiazine is of formula (IV).
 5. The dithiazineof claim 1, wherein the dithiazine is of formula (V).
 6. The dithiazineof claim 5, wherein R¹⁵ is benzyl or naphthylmethyl.
 7. The dithiazineof claim 6, wherein R¹⁴ is methyl.
 8. The dithiazine of claim 7, whereinR¹⁵ is benzyl.
 9. The dithiazine of claim 1, wherein R¹⁴ is methyl. 10.The dithiazine of claim 4, wherein R¹⁴ is phenyl.
 11. A method ofinhibiting corrosion during the treatment of a subterranean formationwhich comprises introducing into a gas or oil well a corrosiveinhibiting effective amount of a mixture comprising: (a) a spent fluidcontaining a dithiazine or dithiazine derivative, the spent fluid havingbeen formed by reaction of hydrogen sulfide and a triazine of theformula:

wherein R is selected from the group consisting of a C₁ to C₁₀ saturatedor unsaturated hydrocarbyl group or a C₁ to C₁₀ ω-hydroxy saturated orunsaturated hydrocarbyl group; and (b) a corrosion inhibitingformulation comprising at least one component selected from the groupconsisting of: (i) an alkyl, hydroxyalkyl, alkylaryl arylalkyl orarylamine quaternary salt; (ii) a mono or polycyclic aromatic aminesalt; (iii) an imidazoline derivative; (iv) a mono-, di- or trialkyl oralkylaryl or arylalkyl phosphate ester; (v) a monomeric or oligomericfatty acid or salt thereof; (vi) an alkyl or alkenyl substitutedpyridinium; (vii) a polyamine amide; (viii) a polyhydroxy or alkoxylatedamine or amide; (ix) a pyrazine derivative; and (x) mercaptocarboxylicacids.
 12. The method of claim 11, wherein the at least one component isan alkyl or alkenyl substituted quaternary pyridine selected from thegroup consisting of N-butyl-4-methylpyridinium chloride,dodecylpyridinium chloride and tetradecylpyridinium chloride,N-methylpyridinium chloride, N-methylpyridinium bromide,N-ethylpyridinium chloride, N-ethylpyridinium bromide, 2-vinylpyridiniumchloride, 2-vinylpyridinium bromide, 3-vinylpyridinium chloride,3-vinylpyridinium bromide, 4-vinylpyridinium chloride and4-vinylpyridinium bromide and mixtures thereof.
 13. The method of claim11, wherein the corrosion inhibiting formulation further comprises ahydrophilic solvent with the at least one component.
 14. The method ofclaim 13, wherein the hydrophilic solvent is water or an organicsolvent.
 15. The method of claim 11, wherein the weight ratio of spentfluid to the corrosion inhibiting formulation is between from about25:75 to about 75:25.
 16. The method of claim 15, wherein the weightratio of spent fluid to the corrosion inhibiting formulation isapproximately 50:50.
 17. The method of claim 11, wherein the mixture isintroduced into the well during stimulation.
 18. The method of claim 11,wherein the at least one component is an alkyl, hydroxyalkyl, alkylarylarylalkyl or arylamine quaternary salt.
 19. The method of claim 11,wherein the at least one component is a quaternary salt of the formula[N⁻R⁵R⁶R⁷R⁸][X⁻] wherein each of R⁵, R⁶, R⁷ and R⁸ contain 1 to about 18carbon atoms and X is Cl, Br or I.
 20. The method of claim 19, whereinat least one of R⁵, R⁶, R⁷ and R⁸ is a C₁-C₆ alkyl group or ahydroxyalkyl group wherein the alkyl group is a C₁-C₆ alkyl or an alkylaryl or arylalkyl.